#ifndef _GAME_ITEM_H_
#define _GAME_ITEM_H_

#include "SDL2/SDL.h"
#include "game_player.h"

#define ITEM_MANAGER_MAX_ITEMS 10

// handles item on the game
struct game_item_manager {

	SDL_Texture *tex;
	SDL_Rect tex_rect;
	SDL_Rect item[ITEM_MANAGER_MAX_ITEMS];
	int active_item [ITEM_MANAGER_MAX_ITEMS];

	int new_item_countdown;

	struct game_map *map;

};

void game_item_manager_init(struct game_item_manager *);
void game_item_manager_update(struct game_item_manager *);
void game_item_manager_draw(struct game_item_manager *);
void game_item_manager_remove(struct game_item_manager *, int);
void game_item_manager_scroll(struct game_item_manager *, int, int);

// check all items for collision
int game_item_manager_collide(struct game_item_manager *, struct game_player *);

#endif
